struct Solution {}

fn main() {}

impl Solution {
    pub fn min_cost_to_move_chips(position: Vec<i32>) -> i32 {
        let mut a: i32 = 0;
        let mut b: i32 = 0;
        for x in position {
            if x % 2 == 0 {
                a += 1;
            } else {
                b += 1;
            }
        }
        if a < b { a } else { b }
    }
}
